﻿using CommonType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace S_UserInfor.Infrasturctre
{
    public interface IRepository<T> where T : class,new()
    {
        //新增
        Task<int> AddAsync(T model);
        //修改
        Task<int> UpdateAsync(T model);
        //删除
        Task<int> DeleteAsync(T t);
        //单个查询
        Task<T>  GetFindAsync(int id);
        // 条件查询
        Task<List<T>> GetAsync(Expression<Func<T, bool>> expre);
    }
}
